The present invention relates to a method of modifying data in an encoded data stream corresponding to successive pictures divided into sub-pictures, comprising the steps of:
decoding said encoded data stream;
re-encoding the decoded data stream.
The invention also relates to a video processing device for carrying out said method. This invention, for instance useful when a broadcaster wants to introduce additional data such as its own logo into a sequence of pictures, finds applications not only in the field of MPEG-2 compression (MPEG-2 will be the common standard for TV broadcasting), but more generally in any digital video data compression system.
In such a situation, i.e when additional digital data have to be added before transmission to an existing coded bitstream, the simplest solution is to decode said bitstream before carrying out said addition. The modified bitstream is then re-coded and transmitted. Unfortunately, a full decoding can generally be considered as expensive, as it requires a decoder and an encoder. Moreover, re-encoding with re-estimated modes and vectors may introduce artefacts on the areas left untouched by the logo addition.
It is therefore a first object of the invention to propose a low-cost solution to add data in a previously existing coded bitstream.
To this end, the invention relates to a method such as described in the opening paragraph of the description and which is moreover characterized in that it also comprises the steps of:
defining a predicted data stream on the basis of an input modifying data stream;
adding to the decoded data stream, before re-encoding it, the difference between the modifying data stream and the predicted one.
This method has for effect to convert the additional data, thanks to the mixing step, into a specific correcting signal that can then be added to the residue signal of the transcoder.
Another object of the invention is to propose an improved method for carrying out an insertion of data with an improved quality with respect to said addition of data.
To this end the invention relates to a method characterized in that it also comprises the step of preprocessing the modifying data stream in order to obtain in the decoded bitstream a substitution of said modifying data to the decoded ones.
Another object of the invention is also to propose devices for implementing the above-mentioned methods.
To this end the invention relates, in a first implementation, to a device for adding data to a video coded data stream, characterized in that it comprises:
(1) a transcoder, for decoding said data stream and re-encoding it;
(2) an addition branch, for defining:
(i) on the basis for these additional data and motion vectors defined in the transcoder, a predicted signal;
(ii) the difference between said additional data and said predicted signal, in view of an addition of said difference into said data stream between decoding and re-encoding parts of said transcoder.
The invention also relates, in a second implementation, to a device for inserting data into a video coded data stream, characterized in that it comprises:
(1) a transcoder, for decoding said bitstream and re-encoding it;
(2) an insertion branch, for defining:
(i) on the basis of these additional data a preprocessed signal;
(ii) on the basis of said preprocessed signal and motion vectors defined in the transcoder, a predicted signal;
(iii) the difference between said preprocessed additional data and said predicted signal, in view of an insertion of said difference into said bitstream between decoding and re-encoding parts of said transcoder.
In the U.S. Pat. No. 5,691,986, a method and apparatus for inserting data into an encoded data stream are described. However, in the situation as described, said stream is in fact a multiplex of elementary data streams that have to be demultiplexed in order to extract one of these elementary streams, to perform a data reduction operation on this extracted stream, and to insert said data into the reduced data stream. The present invention has a distinct object, which is either the addition of data in a picture or, in an improved embodiment, the local replacement of a part of a picture by other picture data.